Fix newly reported PHPStan errors - #539
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe change adds PHPDoc assertions for validated plugin and theme download data. Runtime behavior and public declarations remain unchanged. ChangesDownload data assertions
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR addresses newly reported PHPStan type errors in the download commands by explicitly asserting the expected shape of the data returned from the WordPress.org API calls.
Changes:
- Added array-shape
@varannotations for$theme_datainTheme_Download_Commandafter runtime validation. - Added array-shape
@varannotations for$plugin_datainPlugin_Download_Commandafter runtime validation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Theme_Download_Command.php | Adds PHPDoc array-shape assertion for theme API response to satisfy PHPStan. |
| src/Plugin_Download_Command.php | Adds PHPDoc array-shape assertion for plugin API response to satisfy PHPStan. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary by CodeRabbit